package org.eclipse.jdt.internal.ui.callhierarchy;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.JavaModelException;

public class CompositeFieldRefactor extends AbstractFieldRefactor {
	
	private List<FieldLombokRefactor> fieldRefactors = new ArrayList<FieldLombokRefactor>();
	
	public CompositeFieldRefactor() {
		
	}
	
	public void add(FieldLombokRefactor refactor) {
		fieldRefactors.add(refactor);
	}
 
	public boolean match(IField field) {
		return true;
	}

	public void refactor(IField field) throws JavaModelException {
		if (fieldRefactors.size() > 0) {
			for (FieldLombokRefactor refactor
					: fieldRefactors) {
				refactor.refactor(field);
			}
		}

	}

}
